#include "odom.h"
#include "crc16.h"
#include <string.h>

uint8_t Odom_Pop(Odom* odom, uint8_t* buf)
{
	if (((uint16_t*)buf)[0] != ODOM_HEADER) return 0;
	if (!CRC16Check(buf, ODOM_SIZE(), ODOM_INIT_CRC16)) return 0;
	memcpy(odom, buf, ODOM_SIZE());
	return 1;
}
